package ctn.hibernate.po;

// Generated 2011-12-8 2:29:36 by Hibernate Tools 3.2.4.GA

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CtnMsgTempl generated by hbm2java
 */
@Entity
@Table(name = "ctn_msg_templ", catalog = "cpa")
public class CtnMsgTempl implements java.io.Serializable {

	private Long id;
	private String content;
	private String subject;
	private Date updateDate;
	private Set<CtnUserMsg> ctnUserMsgs = new HashSet<CtnUserMsg>(0);
	private Set<CtnMsgTemplParm> ctnMsgTemplParms = new HashSet<CtnMsgTemplParm>(
			0);

	public CtnMsgTempl() {
	}

	public CtnMsgTempl(Long id, String content, String subject, Date updateDate) {
		this.id = id;
		this.content = content;
		this.subject = subject;
		this.updateDate = updateDate;
	}

	public CtnMsgTempl(Long id, String content, String subject, Date updateDate,
			Set<CtnUserMsg> ctnUserMsgs, Set<CtnMsgTemplParm> ctnMsgTemplParms) {
		this.id = id;
		this.content = content;
		this.subject = subject;
		this.updateDate = updateDate;
		this.ctnUserMsgs = ctnUserMsgs;
		this.ctnMsgTemplParms = ctnMsgTemplParms;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "CONTENT", nullable = false, length = 2000)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "SUBJECT", nullable = false, length = 20)
	public String getSubject() {
		return this.subject;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_DATE", nullable = false, length = 19)
	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ctnMsgTempl")
	public Set<CtnUserMsg> getCtnUserMsgs() {
		return this.ctnUserMsgs;
	}

	public void setCtnUserMsgs(Set<CtnUserMsg> ctnUserMsgs) {
		this.ctnUserMsgs = ctnUserMsgs;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "ctnMsgTempl")
	public Set<CtnMsgTemplParm> getCtnMsgTemplParms() {
		return this.ctnMsgTemplParms;
	}

	public void setCtnMsgTemplParms(Set<CtnMsgTemplParm> ctnMsgTemplParms) {
		this.ctnMsgTemplParms = ctnMsgTemplParms;
	}

}
